home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm2 / cmprss21.lha / CompressRexx.Doc < prev    next >
Text File  |  1996-04-14  |  7KB  |  206 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.       LLL  LLL  L   L LLLL  LLLL  LLLLL  LLL   LLL  LLLL  LLLLL L   L L   L
  7.      L    L   L LL LL L   L L   L L     L     L     L   L L      L L   L L
  8.      L    L   L L L L LLLL  LLLL  LLLL   LLL   LLL  LLLL  LLLL    L     L
  9.      L    L   L L   L L     L  L  L         L     L L  L  L      L L   L L
  10.       LLL  LLL  L   L L     L   L LLLLL  LLL   LLL  L   L LLLLL L   L L   L
  11.  
  12.  
  13.                                 L   L  LL      L
  14.                                 L   L L  L    LL
  15.                                 L   L   L    L L
  16.                                  L L   L       L
  17.                                   L   LLLL L   L
  18.  
  19.  
  20.  
  21.                           (C) 1993-96  Robert Hofmann
  22.  
  23.  
  24.  
  25.  1. Introduction
  26.  ===============
  27.  
  28.   1.1 Legal stuff
  29.   ---------------
  30.  
  31.    CompressRexx  is programm, to  compress & speed-up  ARexx-scripts. It is even
  32.    possible to "convert" (not really ;-) ARexx-scripts into executables.
  33.  
  34.    The programs and files in this distribution are freely distributable, but are
  35.    also Copyright (c)  Robert Hofmann. They may be freely distributed as long as
  36.    no more than a nominal fee is charged to cover time and copying costs.
  37.  
  38.    No commercial usage is  permitted without written permission from the author.
  39.    Everything in this distribution must be kept together, in original unmodified
  40.    form and unmodified archive.
  41.  
  42.  
  43.    CompressRexx is mailware :-). This  means if  you use it,  please write  me a
  44.    short mail. You know,  it is frustrating  to write programs  and there are no
  45.    responses from  the users if they  like it or  not... But of  course money is
  46.    also welcome. ;-)
  47.  
  48.  
  49.    Accepting these few points is the only condition for using CompressRexx...
  50.  
  51.  
  52.    =============================================================================
  53.    The author is not responsible for any  problems caused by using this program!
  54.    =============================================================================
  55.  
  56.  
  57.   1.2 General stuff
  58.   -----------------
  59.  
  60.    I am not the best in  writing doc, but quiet good  in coding I think :-) This
  61.    docs are a bit  short I have to  appolognize, but I hope you'll understand it
  62.    anyway... Especially my English and the typo's ;-)
  63.  
  64.  
  65.    If there is  anybody out there  who is able to &  wants translate the docs to
  66.    his own language, please do so and send them to me! I'll add them to the next
  67.    release. Also translators always will get the newest betas! ;-)
  68.  
  69.    Unfortunatly I don't have the will & time to translate my docs even to German
  70.    - my time is better used for coding :-)
  71.  
  72.  
  73.  
  74.  
  75.  
  76.   1.3 Author
  77.   ----------
  78.  
  79.    If  you  have  suggestions  or remarks about this program, or if you find any
  80.    bugs, please let me know.
  81.  
  82.  
  83.    Contacting the author:
  84.  
  85.      Internet .. :  robert@next.amistep.osn.de (soon!)
  86.      FidoNet ... :  2:2490/1015.0   (may change soon!)
  87.      AmigaNet .. :  39:171/101.0
  88.  
  89.      Snail-mail  :  Robert Hofmann
  90.                     Volkmannstr. 35
  91.                     D-90443 Nürnberg
  92.                     Tel. +49-(0)-911-9941680 (18-20h German time only!!!)
  93.                     Germany
  94.  
  95.      Bank-Account:  Account-holder:  Robert Hofmann
  96.                     Account-number:  67920
  97.                     Bank-ID ..... :  76090000
  98.                     Bank-name ... :  Volksbank Nuernberg e.G.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  2. Features
  105.  ===========
  106.  
  107.   CompressRexx...
  108.  
  109.      ... is able to compress & speed-up ARexx-code
  110.      ... is able to convert an ARexx-Script into an executable
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  3. Usage
  117.  ========
  118.  
  119.   CompressRexx SCRIPT/A,CMPSCR/A,FORCE/S,MAXLEN/K/N,HEADER/S,EXEC/S,VERSION/S
  120.  
  121.      SCRIPT   name of the ARexx-script to compress
  122.      CMPSCR   name or dir of the new compressed script
  123.      FORCE    override all security-checks
  124.      MAXLEN   max. line-length for compression (>= 80 & <= 1024!!!)
  125.      HEADER   keep the header of the original ARexx-script from the first '/*'
  126.               to the first '*/'
  127.      EXEC     convert the script to an executable file (see 4.2.)
  128.      VERSION  try to keep the version-info (see 4.3)
  129.  
  130.  
  131.  
  132.  
  133.  4. Theory of operation
  134.  ======================
  135.  
  136.  
  137.   4.1 Compression
  138.   ---------------
  139.  
  140.    CompressRexx will 'compress' the  script by removing  comments  and  multiple
  141.    spaces.  Depending on the coding  style used  in the  script, compressing can
  142.    produce substantial  space savings, and may also make the  resulting program/
  143.    script execute very slightly faster.
  144.  
  145.    The compression is done intelligently, with due allowance for nesting of both
  146.    quotes and comments, and treating all quoted material as strictly literal. It
  147.    will  cause  problems  only for  scripts  that call the  SOURCELINE  built-in
  148.    function or that depend on particular values of SIGL.
  149.  
  150.  
  151.  
  152.   4.2 Converting the script to an executable file
  153.   -----------------------------------------------
  154.  
  155.    The ARexx script is  augmented  with an  assembler front end  that passes the
  156.    script to ARexx as a string file to be executed as a function.
  157.  
  158.    Why  not  execute  it  as a  command?  Because  you can't  give  command-line
  159.    arguments to a string  file executed as a  command. However,  by treating the
  160.    script as a  function to which  the command  line is  the sole  argument, the
  161.    command  line can be  accessed as ARG(1) (or  equivalently with  ARG or PARSE
  162.    ARG) just as though you executed it with RX.
  163.  
  164.    The script is still contained  in the executable file, starting a little more
  165.    than 500 bytes in.
  166.  
  167.    The script will *NOT* be  compiled into a real  executable! You  still need a
  168.    working ARexx-enviorment.
  169.  
  170.    Also a big advantage of  this methode is, that  now, you can make even ARexx-
  171.    scripts resident, what could be very usefull for often-called scripts.
  172.  
  173.  
  174.  
  175.   4.3 The version of an ARexx-Script
  176.   ----------------------------------
  177.  
  178.    As you might  know, it is possible to get  the version via  the 'version'-cmd
  179.    even from an ARexx-Script, if it was added to the script like
  180.  
  181.                         $VER: Test.rexx 1.0  (07.03.96)
  182.  
  183.    Even if you try 'version' on this document, you'll get this as version :-)
  184.  
  185.  
  186.    Now if you use  VERSION together with EXEC, CompressRexx  will try to get the
  187.    version  of  your  script by  using  the  command  'c:version'. If  this  was
  188.    successful, it will add this version to the executable, so that you still can
  189.    use the 'version'-command even on the executable.
  190.  
  191.  
  192.    If you don't use EXEC, it is presummed, that you've already added the version
  193.    -info to the header of your script. Use HEADER, to keep it.
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.   _  o         Robert Hofmann         2:2490/1015@FidoNet   37:108/220@TrekNet
  203.  |<)_/#                              39:171/101@AmigaNet   107:1805/230@TrekNet
  204.  TT  <T  robert@next.amistep.osn.de  56:63/201@XNet        213:314/9127@XCessNet
  205.  
  206.